home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Compiling Extension < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  2.2 KB  |  [TEXT/ttxt]

  1. Subject:     Compiling Extension
  2. Sent:        6/2/96 2:38 PM
  3. Received:    6/3/96 7:58 AM
  4. From:        Doyle Rhynard, doyle.w.rhynard@cpmx.saic.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8.     I am trying to create an extension for a part editor. In order to test
  9. the procedure, I have made a simple test case. I am starting with the IDL
  10. file:
  11.  
  12.         #ifndef TestExt_IDL
  13.                 #define TestExt_IDL
  14.  
  15.                 #include "Extensn.idl"
  16.  
  17.                 interface TestExt;
  18.  
  19.                 module ADI {
  20.                         interface TestExt: ODExtension {
  21.                                 void    InitTestExt(in ODObject base, in
  22. long initialID);
  23.                                 void    Run(in TestExt object);
  24.  
  25.                                 #ifdef __SOMIDL__
  26.                                         implementation {
  27.                                                 releaseorder:
  28.                                                         InitTestExt,
  29.                                                         Run,
  30.  
  31.                                                 majorversion = 1;
  32. minorversion = 0;
  33.                                         };
  34.                                 #endif
  35.                         };
  36.                 };
  37.  
  38.         #endif
  39.  
  40. This file is included into a CW9 project. The SOMObjectsTS compiler creates
  41. the other SOM files without errors, although warning messages about the
  42. function declarations not being in the correct relase order, are generated.
  43.  
  44.  
  45.     When I try to compile the .cpp file, however, I get numerous compiler
  46. errors from .xh file of the form:
  47.  
  48.         Error   : ';' expected
  49.         TestExt.xh line 144   typedef long   (* SOMLINK
  50. somTD_ADI_TestExt_somGetSize)(ADI_TestExt
  51.                         somSelf, Environment *ev);
  52.  
  53. I have tried every variation I could think of without success. I even tried
  54. using the SOMObjects "Hello" example and got the same type of errors.
  55.  
  56.    Does anyone happen to know what I am doing wrong? Better yet, does
  57. anyone have a simple example, of this general level of complexity, that
  58. will work with CW9's SOMObjectTS compiler and produce correct results?
  59.  
  60. Doyle Rhynard
  61.  
  62.